require.config({baseUrl: '/js/lib', urlArgs: "v0.0.1"});
require(["zepto", "lib", 'swiper'], function ($, lib, swiper) {
    lib = new lib();
    var fn = {};
    $.extend(fn, {
        init: function () {
            this.initPage();
        },
        initPage: function () {
            var _t = this;
            var classid = lib.getUrlParam('classid') ? lib.getUrlParam('classid') : '1';
            lib.ajx(lib.getReq().ser + 'classroom/getDetail.action', {classroomId:classid}, function (data) {
                if (data.infocode === "0") {
                    var d = data.info;
                    $('.ui-banner img').attr('src',lib.getReq().imgPath + d.picture);
                    $('.ui-know-title').html(d.title);
                    var type = d.type == '1' ? "知识讲堂" : "线下活动";
                    $('.ui-know-time').html(type + "  " + d.createDate);
                    $('.ui-know-desc').html(d.content);
                } else {
                    lib.showMessage(data.info);
                }
            }, function () {
                lib.showMessage('网络延时，请稍后再试');
            });
    }
    });
    fn.init();
});
